//
//  GameZanCollectionViewCell.m
//  GOGOTravel
//
//  Created by dllo on 16/3/5.
//  Copyright © 2016年 果果. All rights reserved.
//

#import "GameZanCollectionViewCell.h"

@implementation GameZanCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createViews];
    }
    return self;
}

- (void)createViews{
    
    self.imageView1 = [[UIImageView alloc] init];
    [self.contentView addSubview:_imageView1];
    [_imageView1 release];
}

- (void)setModel:(GameXangQing *)model{
    if (_model != model) {
        [_model release];
        _model = [model retain];
    }
    
    [_imageView1 sd_setImageWithURL:[NSURL URLWithString:_model.avatar_m] placeholderImage:[UIImage imageNamed:PLACE_HLODER]];
    
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes{
    _imageView1.frame = CGRectMake(0, 0, layoutAttributes.frame.size.width, layoutAttributes.frame.size.height);
    _imageView1.layer.cornerRadius = 30;
    _imageView1.layer.masksToBounds = YES;
}

- (void)dealloc{
    [_imageView1 release];
    [_model release];
    [super dealloc];
}


@end
